<!DOCTYPE html>
<html lang="en">

	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title></title>
		<link href="../../app/js/bootstrap-3.3.7-dist/css/bootstrap.min.css" rel="stylesheet">
		<link rel="stylesheet" type="text/css" href="../../app/css/footer.css" />
		<link rel="stylesheet" href="../../app/css/lystyle.css" />
		<style type="text/css">
			/*修改底部字体颜色*/
			
			.foot:nth-child(2) {
				color: #e83023;
			}
			
			#wrap div#content {
				padding-top: 1.2rem;
			}
		</style>
		<script src="../../app/js/flexible.min.js" type="text/javascript" charset="utf-8"></script>
	</head>

	<body>
		<div id="wrap">
			<div id="main">
				<div id="header">
					<a href="javascript:history.go(-1)" id="headImg"><img class="headImg" src="../../app/images/12.png" /></a>
					<p id="headTitle">我的消息</p>
				</div>
				<div id="content">
					<ul class="ly-person">


					</ul>
				</div>
			</div>
		</div>
	</body>
	<script src="../../app/js/jquery-2.2.3.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../app/js/jquery.cookie.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
		var tokenReztApp = $.cookie("tokenReztApp");
		console.log(tokenReztApp);
		if(!tokenReztApp) {
			window.location.href = "../../app/view/login/login/login.html";
		}
		$(function() {
			currentyf();
		});

		//用户信息
		var user, role, goodsId;
		//获取当前会员信息
		function currentyf() {
			$.ajax({
				cache: false,
				type: "GET",
				url: "http://47.104.13.109/member-service/auth/current?token=" + tokenReztApp,
				dataType: "JSON",
				async: false,
				error: function(XMLHttpRequest, textStatus, errorThrown) {
					$.removeCookie('tokenReztApp', {
						expires: 7,
						path: '/'
					});
					window.location.href = "../../app/view/login/login/login.html";
				},
				success: function(data) {
					/*if(data.roleList[0].id != "f2") {
						window.location.href = "../../app/view/login/login/login.html";
					}*/
					console.log(data.ext1);
					user = data.loginName;
					role = data.roleList[0].id; //角色
					goodsId = data.id;

				}
			});
		}
		$(function() {
			searchUserInfo(1, 100);
		})

		var pageNums, pageSizes;
		//查询收到的信息
		function searchUserInfo(pageNum, pageSize) {
			pageNums = pageNum;
			pageSizes = pageSize;
			$.ajax({
				type: "GET",
				url: "http://47.104.13.109/information-service/information/searchUser",
				dataType: "JSON",
				data: {
					'pageNum': 1,
					'pageSize': 999,
					'receiveRole': "f2",
					'receivePerson': goodsId
				},
				async: false,
				success: function(data) {
					console.log(data)
					var html = "";
					for(var i = 0; i < data.pageInfo.list.length; i++) {
						list = data.pageInfo.list[i];
						html += '<li class="ly-person-li" style="background-color: white;padding: 0 0.5rem 0.2rem 0.5rem;"><a><span class="ly-person-span" style="font-size: 0.388888rem;"><b>系统消息</b></span><span style="float: right; padding-right: 0.2rem; font-size: 0.388888rem;">' + list.inforDate + '</span></a><span class="ly-person-span1">' + list.inforContent + '</span></li>';
					}
					$('.ly-person').html(html);
				}
			});
		}
	</script>

</html>